package com.majie.algorithm.tree;

import com.majie.algorithm.tree.printer.BinaryTrees;

public class Main {

    public static void main(String[] args) {
        int[] array = {
                7, 4, 9, 2, 5
        };
        BinarySearchTree<Integer> binarySearchTree = new BinarySearchTree<>();

        for (int i : array) {
            binarySearchTree.add(i);
        }

        BinaryTrees.println(binarySearchTree);
//        binarySearchTree.preorderTraversal();
//        binarySearchTree.levelTraversal();

        System.out.println(binarySearchTree.preNode());
        System.out.println(binarySearchTree.isComplete());

        BinaryTrees.println(binarySearchTree);
    }
}
